package stack;

import java.util.Stack;

public class Test {
    public static void main(String[] args) {

    }
    public static void main02(String[] args) {
        MyStack myStack = new MyStack();
        int[] arr1 = {1,2,3,4,5};
        int[] arr2 = {4,5,3,2,1};
        System.out.println(myStack.IsPopOrder(arr1, arr2));
    }
    public static void main01(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        System.out.println(stack.size());
        int len = stack.size();
        for (int i = 0; i < len; i++) {
            System.out.print(stack.pop()+" ");
        }
    }
}